public class Main20250402 {
}

class Solution {
    public long maximumTripletValue(int[] nums) {
        int max1 = Integer.MIN_VALUE, max2 = Integer.MIN_VALUE, min = Integer.MAX_VALUE;
        for (int num : nums) {
            if (num > max1) {
                max2 = max1;
                max1 = num;
            } else if (num > max2) {
                max2 = num;
            }
            if (num < min) {
                min = num;
            }
        }
        System.out.println(max1 + " " + max2 + " " + min);
        if (max1 < 0 && max2 < 0 && min < 0) {

        }
    }
}